import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
// 使用vuex，引用store
// import store from './store'

Vue.use(ElementUI)
// 此处放后端服务器地址 axios.defaults.baseURL='***'
Vue.prototype.$http = axios

// jwh
const host = "http://localhost:8080"
const hostHou = "http://localhost:8090"
Vue.prototype.$host = host
Vue.prototype.$hostHou = hostHou
// jwh

// 日期过滤器
Vue.filter('dataFormat', function (originVal) {
  const dt = new Date(originVal)
  const y = dt.getFullYear()
  const m = (dt.getMonth() + 1 + '').padStart(2, '0')
  const d = (dt.getDate() + '').padStart(2, '0')
  return `${y}-${m}-${d}`
})

Vue.config.productionTip = false
new Vue({
  router,
  // store,
  render: h => h(App)
}).$mount('#app')
